<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" th:href="@{/AdminLTE/bootstrap/css/bootstrap.min.css}">
    <!-- jQuery 2.2.3 -->
    <script th:src="@{/AdminLTE/plugins/jQuery/jquery-2.2.3.min.js}"></script>
    <!-- Bootstrap 3.3.6 -->
    <script th:src="@{/AdminLTE/bootstrap/js/bootstrap.min.js}"></script>
    <!-- Theme style -->
    <link rel="stylesheet" th:href="@{/AdminLTE/dist/css/AdminLTE.min.css}">
    <!-- layui -->
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}">
    <!-- layui -->
    <script th:src="@{/layui/layui.js}"></script>
    <!-- myfile js -->
    <script th:src="@{/js/tool/myfile.js}"></script>
</head>
<body>

<!-- Content Header (Page header) -->
<section class="content-header">
    <h1>
        系统管理
        <small>文件管理</small>
    </h1>
    <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> 主页</a></li>
        <li class="active">系统管理</li>
    </ol>
</section>

<div style="margin-top: 15px;">
    <div class="demoTable" style="margin-left: 10px;">
        搜索文件名称：
        <div class="layui-inline">
            <input type="text" class="layui-input" name="file_name" id="fileNameReload" autocomplete="off">
        </div>
        <button class="layui-btn layui-btn-normal" id="fileNameSearch" data-type="reload">
            <i class="layui-icon">&#xe615;</i>搜索
        </button>
        <button class="layui-btn layui-btn-warm" onclick="window.location.reload();">
            <i class="layui-icon">&#xe669;</i>刷新
        </button>
    </div>

    <table class="layui-hide" id="MyFile" lay-filter="MyFileTable"></table>

    <script type="text/html" id="fileToolBar">
        <div class="layui-btn-container">
            <button shiro:hasPermission="file:delete" type="button" class="layui-btn layui-btn-sm layui-btn-danger" lay-event="batchDel">批量删除</button>
            <button shiro:hasPermission="dllog:look" type="button" class="layui-btn layui-btn-sm" data-toggle="modal" data-target="#DownLoadLogModel">下载记录</button>
            <button shiro:hasPermission="file:upload" type="button" class="layui-btn layui-btn-sm layui-btn-normal" data-toggle="modal" data-target="#UploadModel">上传文件</button>
        </div>
    </script>

    <script type="text/html" id="FileRightBar">
        <a shiro:hasPermission="file:download" class="layui-btn layui-btn-xs layui-btn-normal" lay-event="downLoad">下载</a>
        <a shiro:hasPermission="file:update" class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
        <a shiro:hasPermission="file:delete" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
    </script>

</div>


<!--上传文件的模态框start-->
<div id="UploadModel" class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="UpLargeModalLabel">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="UpLargeModalLabel">上传文件</h4>
            </div>
            <div class="modal-body">
                <!--文件上传-->
                <div class="layui-upload">
                    <button type="button" class="btn btn-info btn-sm" id="testList">选择多文件</button>
                    <button type="button" class="btn btn-success btn-sm" id="testListAction">开始上传</button>
                    <div class="layui-upload-list">
                        <table class="layui-table">
                            <thead>
                            <tr><th>文件名</th>
                                <th>大小</th>
                                <th>状态</th>
                                <th>操作</th>
                            </tr></thead>
                            <tbody id="demoList"></tbody>
                        </table>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="layui-btn" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>
<!--上传文件的模态框end-->

<!--下载记录的模态框start-->
<div id="DownLoadLogModel" class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="DownLargeModalLabel">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="DownLargeModalLabel">下载记录</h4>
            </div>
            <div class="modal-body">
                <div class="demoTable">
                    搜索文件名称：
                    <div class="layui-inline">
                        <input type="text" class="layui-input" name="file_name" id="dllogFileNameReload" autocomplete="off">
                    </div>
                    <button class="layui-btn layui-btn-normal" id="dllogFileNameSearch" data-type="reload">
                        <i class="layui-icon">&#xe615;</i>搜索
                    </button>
                </div>
                <table class="layui-hide" id="roleList" lay-filter="roleTableFilter"></table>
                <script type="text/html" id="roleToolbar">
                    <div class="layui-btn-container">
                        <button shiro:hasPermission="dllog:look" class="layui-btn layui-btn-sm layui-btn-normal" lay-event="getJSON">查看JSON数据</button>
                        <button shiro:hasPermission="dllog:delete" class="layui-btn layui-btn-sm layui-btn-danger" lay-event="batchDelDllog">批量删除</button>
                        <button class="layui-btn layui-btn-sm layui-btn-warm" lay-event="flushDllogTable">刷新表格</button>
                    </div>
                </script>
                <script type="text/html" id="dllogFileRightBar">
                    <a shiro:hasPermission="dllog:delete" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delDllog">删除</a>
                </script>
            </div>
            <div class="modal-footer">
                <button type="button" class="layui-btn" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>
<!--下载记录的模态框end-->

</body>
</html>